import request from '@/utils/request.js'; 

/**
 * 分页数据查询
 * @param {Object} params
 */
export function dataApi(params) {
  return request({
    url: '/api/category/data',
    method: 'get',
    params: params
  })
}


/**
 * 新增接口
 * @param {Object} data
 */
export function addApi(data){
  return request({
    url: '/api/category',
    method: 'post',
    data: data
  })
}

/**
 * 修改接口
 * @param {Object} data
 */
export function updateApi(data){
  return request({
    url: '/api/category',
    method: 'put',
    data: data
  })
}

/**
 * 根据主键查询
 * @param {Object} id
 */
export function findByIdApi(id){
  return request({
    url: '/api/category/'+id,
    method: 'get'
  })
}
 
/**
 * 删除接口
 * @param {Object} data
 */
export function removeApi(ids){
  return request({
    url: '/api/category/'+ids,
    method: 'delete'
  })
}